Martin Buck delivers "track" upload for Garmin fitness devices.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 26 Mar 2010 03:33:18 +0000 (03:33 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 26 Mar 2010 03:33:18 +0000 (03:33 +0000)
commit479bc56383c823989c8cc07f0f95c9688c22786b
tree4a4b3139b60bdbf83c3720f1fa9f2c5db4884a7b
parenta67fc2f7892a8cdfcceaae4f4bc0e36171db2240
Martin Buck delivers "track" upload for Garmin fitness devices.

Changes:
* If tracks and waypoints should be uploaded to a device supporting course
 upload, combine them to courses and course points and upload them together
* Split track/waypoint preparation and upload into separate functions in
 garmin.c since both preparation functions are needed together for
 course+course point upload
* Merged GPS_A301_Get()/GPS_A302_Get, GPS_A301_Send()/GPS_A302_Send()
* Properly handle track segment markers for fitness devices consisting of 2
 consecutive invalid track points
* Calculate lap data totals when creating a course. Also create time stamps
 (currently using a hardcoded speed of 10km/h) for track points that lack
 them. This is required so that course points can refer to track points and
 identify them uniquely.
* Fixed course garbage collection to remove unused track points properly. So
 far, we compared the track index with the course index instead of the
 course track index which inadvertently removed tracks that were
 refereneced and left others that weren't referenced.
* Remove duplicate course points (same course index and track point time
 stamp) because the protocol spec requires these two values to be unique.
* Create course points from waypoints by mapping them to the nearest track
 point.
* Use xrealloc() consistently
gpsbabel/garmin.c
gpsbabel/jeeps/gpsapp.c
gpsbabel/jeeps/gpsapp.h
gpsbabel/jeeps/gpscom.c
gpsbabel/jeeps/gpscom.h